package com.itheima.controller;

import com.itheima.pojo.LoginInfo;
import com.itheima.pojo.Result;
import com.itheima.pojo.EmpDto;
import com.itheima.service.EmpService;
import jakarta.servlet.http.HttpSession;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    EmpService empService;
@PostMapping
    public Result findLoginInfo(@RequestBody EmpDto empDto){
    LoginInfo info = empService.findLoginInfo(empDto);
        return Result.success(info);
    }

}
